home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
T-TPUG Old Monthly Disks
/
(c)tv.d64
/
bio-printer.c
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
4KB
|
139 lines
100 REM BIOPRINTER 6.0
110 DIMA%(12),M$(12)
120 PRINT"[147]"TAB(9)" B I O P R I N T E R "
130 INPUT"INPUT DEVICE #, SCREEN=3 PRINTER=4";DV
140 IFDV<>3ANDDV<>4THEN130
150 OPEN4,DV
160 CO=39
170 REM*FOR80 COL:IFDV=4THENCO=79
180 S$=CHR$(1):CL=INT((CO-10)/2):CN=CL+10
190 FORI=1TO10:CR$=CR$+CHR$(13):NEXT
200 FORI=1TOCO:SP$=SP$+" ":AS$=AS$+" ":AR$=AR$+"--":NEXT
210 FORI=1TO12:READA%(I):NEXT
220 FORI=0TO6:READDAY$(I):NEXT
230 FORI=1TO12:READM$(I):NEXT
240 READDD$
250 INPUT"INPUT YOUR NAME";N$
260 LETZ=0
270 INPUT"INPUT BIRTH DATE MM,DD,YY";MB,DB,YB
280 MS=INT(MS):DS=INT(DS):YS=INT(YS)
290 INPUT"INPUT START DATE MM,DD,YY";MS,DS,YS
300 MB=INT(MB):DB=INT(DB):YB=INT(YB)
310 DEFFNI(X)=INT(CL*SIN(2*(null)*X/33)+.5)
320 DEFFNE(X)=INT(CL*SIN(2*(null)*X/28)+.5)
330 DEFFNP(X)=INT(CL*SIN(2*(null)*X/23)+.5)
340 TS=INT(DS+365.25*YS+A%(MS)+.01*MS-.03)
350 TB=INT(DB+365.25*YB+A%(MB)+.01*MB-.03)
360 X=TS-TB
370 INPUT"HOW MANY DAYS TO RUN";SP
380 PRINT"WOULD YOU LIKE THE BIORHYTHM THEORY"
390 INPUT"EXPLAINED ON YOUR PRINTOUT";P$
400 SP=SP-1
410 RB=TB-1-INT((TB-1)/7)*7
420 PRINT"[147]";
430 PRINT#4,"";S$"********** B I O R H Y T H M **********"
440 PRINT#4,LEFT$(CR$,2)
450 IFLEFT$(P$,1)="Y"THEN GOSUB1130
460 T$=" ANALYSIS FOR "+N$+" "
470 T2$=S$:GOSUB1060
480 PRINT#4," "
490 T$=" BORN "+DAY$(RB)+", "+M$(MB)+STR$(DB)+", 19"
500 T$=T$+RIGHT$(STR$(INT(YB/10)),1)+RIGHT$(STR$(YB),1)+" "
510 T2$="":GOSUB1060
520 R=TS-1-INT((TS-1)/7)*7
530 GOTO660
540 T$=" STARTING DATE "+DAY$(R)+","+M$(MS)+STR$(DS)+", 19"
550 T$=T$+RIGHT$(STR$(INT(YS/10)),1)+RIGHT$(STR$(YS),1)+" "
560 T2$="":GOSUB1060
570 T$=STR$(INT(23*(X/23-INT(X/23))))+" DAYS INTO THE PHYSICAL CYCLE"
580 T2$="":GOSUB1060
590 T$=STR$(INT(28*(X/28-INT(X/28))))+" DAYS INTO THE EMOTIONAL CYCLE"
600 T2$="":GOSUB1060
610 T$=STR$(INT(33*(X/33-INT(X/33))))+" DAYS INTO THE INTELLECTUAL CYCLE"
620 T2$="":GOSUB1060
630 T$="P = THE PHYSICAL CYCLE":T2$="":GOSUB1060
640 T$="E = THE EMOTIONAL CYCLE":T2$="":GOSUB1060
650 T$="I = THE INTELLECTUAL CYCLE":T2$="":GOSUB1060
660 PRINT#4
670 PRINT#4,SPC(13)"DOWN UP"
680 GOSUB1300
690 GOSUB1320
700 REM
710 T$=LEFT$(DAY$(R),3)+" "+MID$(DD$,2*DS-1,2)+" [161]"+M$(MS)
720 F(0)=CN:F$(0)="*"
730 F(1)=CN+FNI(X):F$(1)="I"
740 F(2)=CN+FNE(X):F$(2)="E"
750 F(3)=CN+FNP(X):F$(3)="P"
760 F=0
770 FORI=0TO2
780 FORJ=I+1TO3
790 IFF(I)<F(J)THEN850
800 IFF(I)=F(J)ANDF(I)=CNTHENIFF(I)=CNTHENF(I)=0:F$(I)="":F$(J)="C":F=1:GOTO850
810 IFF(I)=F(J)THENF(I)=0:F$(I)="":F$(J)="X":GOTO850
820 Q=F(I):Q$=F$(I)
830 F(I)=F(J):F$(I)=F$(J)
840 F(J)=Q:F$(J)=Q$
850 NEXTJ,I
860 IFF=1THENT$=T$+LEFT$(AR$,CN-1-LEN(T$))
870 FORI=0TO3
880 W=LEN(T$)
890 IFF(I)<=WTHEN910
900 T$=T$+LEFT$(SP$,F(I)-W)+F$(I)
910 NEXT
920 PRINT#4,T$:X=X+.5:IFINT(X)<>XTHENT$=" [161]":GOTO720
930 IFZ=SPTHEN1030
940 R=R+1:IFR=7THENR=0
950 DS=DS+1:IFMS=4ORMS=6ORMS=9ORMS=11THENL=30:GOTO990
960 IFMS=2ANDYS/4=INT(YS/4)THENL=29:GOTO990
970 IFMS=2THENL=28:GOTO990
980 L=31
990 IFDS>LTHENDS=DS-L:MS=MS+1:GOTO1010
1000 T$=LEFT$(DAY$(R),3)+" "+MID$(DD$,2*DS-1,2)+" [161]":Z=Z+1:GOTO720
1010 IFMS=13THENMS=1:Z=Z+1:GOTO700
1020 Z=Z+1:GOTO700
1030 GOSUB1300:GOSUB1320
1040 FORSS=1TO3:PRINT#4,:NEXT
1050 GOTO250
1060 CT=INT(CO/2)
1070 IFT2$=""THENCT=CO
1080 T1=INT((CT-LEN(T$))/2)
1090 IFT1<1THENPRINT#4,T$:GOTO1120
1100 T2$=T2$+LEFT$(AS$,T1)+T$
1110 PRINT#4,T2$:PRINT#4
1120 RETURN
1130 PRINT#4,"THE PURPOSE OF BIORHYTHM IS TO PREDICT"
1140 PRINT#4,"A PHYSICAL, EMOTIONAL AND INTELLECTUAL"
1145 PRINT#4,"PATTERN THAT INDICATES YOUR UP AND"
1150 PRINT#4,"DOWN DAYS FOR ANY PERIOD OF TIME."
1155 PRINT#4," BIORHYTHM CAN SHOW WHICH DAYS WERE"
1160 PRINT#4,"GOOD OR BAD FOR YOU BEGINNING WITH"
1170 PRINT#4,"YOUR BIRTH. IT CAN ALSO SHOW YOU WHICH"
1175 PRINT#4,"FUTURE DAYS WILL BE GOOD OR BAD FOR"
1180 PRINT#4,"YOU."
1182 PRINT#4," THESE PREDICTIONS ARE BASED ON"
1190 PRINT#4,"SCIENTIFIC STUDIES TO DETERMINE WHY"
1195 PRINT#4,"ACCIDENTS OCCUR. IT WAS LEARNED"
1200 PRINT#4,"THROUGH THESE STUDIES THAT A PHYSICAL"
1210 PRINT#4,"CYCLE OCCURS EVERY 23 DAYS, AN"
1215 PRINT#4,"EMOTIONAL CYCLE OCCURS EVERY 28 DAYS,"
1220 PRINT#4,"AND AN INTELLECTUAL CYCLE OCCURS EVERY"
1230 PRINT#4,"33 DAYS."
1232 PRINT#4," THE CRITICAL DAYS OCCUR DURING THE"
1235 PRINT#4,"TRANSITION FROM POSITIVE TO NEGATIVE"
1240 PRINT#4,"STATES. DURING THE CRITICAL DAYS YOU"
1250 PRINT#4,"ARE MORE PRONE TO ERRORS, ACCIDENT AND"
1255 PRINT#4,"PHYSICAL SETBACKS."
1260 PRINT#4," THIS BIORHYTHM PLOT FLAGS THE"
1270 PRINT#4,"CRITICAL DAYS."
1280 PRINT#4:PRINT#4
1290 RETURN
1300 FORI=1TOCO:PRINT#4,"-";:NEXT:PRINT#4
1310 RETURN
1320 FORI=1TOCO:PRINT#4,"-";:NEXT:PRINT#4
1330 RETURN
1340 DATA0,31,59,90,120,151,181,212,243,273,304,334
1350 DATAMONDAY,TUESDAY,WEDNESDAY,THURSDAY,FRIDAY,SATURDAY,SUNDAY
1360 DATAJANUARY,FEBRUARY,MARCH,APRIL,MAY,JUNE,JULY,AUGUST
1370 DATASEPTEMBER,OCTOBER,NOVEMBER,DECEMBER
1380 DATA" 1 2 3 4 5 6 7 8 910111213141516171819202122232425262728293031"